package org.spring.springboot.direct;

import org.junit.Test;
import org.spring.springboot.domain.City;
import org.spring.springboot.dubbo.CityDubboService;

/**
 * 
 * 直连DemoService服务测试类
 * @author liaoqn
 *
 */
public class DemoServiceDirectConsumer extends BaseDubboDirectConsumer<CityDubboService> {

	@Test
	public void sayHelloTest() {
		// 直接通过父类中的 service 变量得到 DemoService 服务
		City city = service.findCityByName("wuhan"); // call remote method
        System.out.println("DemoService Response: " + city.toString()); // get result
   
	}
	
	@Override
	protected String getUrl() {
		// dubbo服务地址
		return "dubbo://127.0.0.1:20880/org.spring.springboot.dubbo.CityDubboService";
	}
	
}